package com.ctshk.rpc.air.entity.es;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalTime;
import java.util.List;

/**
 * @BelongsProject: ctshk-cloud
 * @BelongsPackage: com.ctshk.rpc.air.entity.es
 * @Author: hef
 * @CreateTime: 2021-04-16 16:55
 * @Description: 描述
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Document(indexName = "air_product")
public class AirProductEs implements Serializable {

    @Id
    @ApiModelProperty(value = "产品Id")
    private Long productId;

    @Field(type = FieldType.Long)
    @ApiModelProperty(value = "航班id")
    private Long flightId;

    @Field(type = FieldType.Text)
    @ApiModelProperty(value = "航空公司名称")
    private String companyName;

    @Field(type = FieldType.Long)
    @ApiModelProperty(value = "航空公司Id")
    private Long companyId;

    @Field(type = FieldType.Keyword)
    @ApiModelProperty(value = "航班号")
    private String flightNumber;

    @Field(type = FieldType.Long)
    @ApiModelProperty(value = "出发城市id")
    private Long depCityId;

    @Field(type = FieldType.Text)
    @ApiModelProperty(value = "出发城市名称")
    private String depCityName;

    @Field(type = FieldType.Long)
    @ApiModelProperty(value = "到达城市id")
    private Long arrCityId;

    @Field(type = FieldType.Text)
    @ApiModelProperty(value = "到达城市名称")
    private String arrCityName;

    @Field(type = FieldType.Long)
    @ApiModelProperty(value = "起飞机场id")
    private Long depAirportId;

    @Field(type = FieldType.Text)
    @ApiModelProperty(value = "起飞机场")
    private String depAirportName;

    @Field(type = FieldType.Long)
    @ApiModelProperty(value = "到达机场id")
    private Long arrAirportId;

    @Field(type = FieldType.Text)
    @ApiModelProperty(value = "到达机场")
    private String arrAirportName;

    @Field(type = FieldType.Date,format = DateFormat.hour_minute)
    @ApiModelProperty(value = "起飞时间")
    private LocalTime depTime;

    @Field(type = FieldType.Date,format = DateFormat.hour_minute)
    @ApiModelProperty(value = "到达时间")
    private LocalTime arrTime;

    @Field(type = FieldType.Long)
    @ApiModelProperty(value = "机型")
    private Long airplaneType;

    @Field(type = FieldType.Text)
    @ApiModelProperty(value = "机型名稱")
    private String airplaneName;


    @Field(type = FieldType.Long)
    @ApiModelProperty(value = "舱位等级類型id(主数据获取)")
    private Long cabinClass;

    @Field(type = FieldType.Text)
    @ApiModelProperty(value = "舱位等级類型名称)")
    private String cabinName;

    @Field(type = FieldType.Long)
    @ApiModelProperty(value = "供应商id")
    private Long supplierId;

    @Field(type = FieldType.Text)
    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @Field(type = FieldType.Auto,name = "airProductPriceSettings")
    @ApiModelProperty(value = "预订设置")
    private AirProductPriceSettingsEs airProductPriceSettingsDTO;

    @Field(type = FieldType.Auto,name = "productCostList")
    @ApiModelProperty(value = "产品成本信息")
    private List<AirProductCostEs> productCostList;

    @Field(type = FieldType.Auto,name = "saleStrategy")
    @ApiModelProperty(value = "加幅策略" )
    private List<AirProductSaleStrategyEs> saleStrategy;

    @Field(type = FieldType.Integer)
    @ApiModelProperty(value = "是否直达 1直达 2中转")
    private Integer onWay;

    @Field(type = FieldType.Integer)
    @ApiModelProperty(value = "是否推荐 （0不推荐 1推荐）")
    private Integer recommendStatus;

    @ApiModelProperty(value = "最低價")
    private BigDecimal lowPrice;

}
